<template>
  <div class="usercomment-area">
    <van-dropdown-menu active-color="#1c8cd7" v-if="comments || hotComments">
      <van-dropdown-item v-model="value" :options="option" />
    </van-dropdown-menu>

    <!-- 看我骚操作 -->
    <PlayListCommentItem
      v-for="(item, index) in value === 0 ? comments : hotComments"
      :key="index"
      :item="item"
    />
  </div>
</template>

<script>
import PlayListCommentItem from "../basics/PlayListCommentItem.vue";
export default {
  name: "UserCommentArea",
  data() {
    return {
      value: 0,
      option: [
        { text: "最新", value: 0 },
        { text: "最热", value: 1 },
      ],
    };
  },
  props: {
    comments: Array,
    hotComments: Array,
  },
  components: {
    PlayListCommentItem,
  },
};
</script>

<style lang="less" scoped></style>
